﻿@{ Layout = null; }

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>删除印章</title>
    <script language="javascript" type="text/javascript">
        function Save() {
             var myObject = {};
            myObject.folderName = "DeleteSeal";
            var params = new URLSearchParams(myObject);
            var saveUrl = "/InsertSeal/PDF/SaveFile";
            pdfctrl.SaveFilePage = `${saveUrl}?${params.toString()}`;
            pdfctrl.WebSave();
        }

        function InsertSealByUser() {
            try {
                pdfctrl.zoomseal.AddSeal("李志");
            } catch (e) {
            }
        }

        function DeleteAllSeal() {
            let sealsJson = JSON.parse(pdfctrl.zoomseal.SealsAsJson);
            for (var i = sealsJson.length; i >= 1; i--) {
                pdfctrl.zoomseal.DeleteLastSeal();
            }
        }

        function DeleteLastSeal() {
            pdfctrl.zoomseal.DeleteLastSeal();
        }

        function ChangePsw() {
            pdfctrl.zoomseal.ShowSettingsBox();
        }
        function AfterDocumentOpened() {
            //alert(pdfctrl.Caption);
        }
        function SetBookmarks() {
            pdfctrl.BookmarksVisible = pdfctrl.BookmarksVisible;
        }
        function PrintFile() {
            pdfctrl.ShowDialog(4);
        }
        function SwitchFullScreen() {
            pdfctrl.FullScreen = !pdfctrl.FullScreen;
        }
        function SetPageReal() {
            pdfctrl.SetPageFit(1);
        }
        function SetPageFit() {
            pdfctrl.SetPageFit(2);
        }
        function SetPageWidth() {
            pdfctrl.SetPageFit(3);
        }
        function ZoomIn() {
            pdfctrl.ZoomIn();
        }
        function ZoomOut() {
            pdfctrl.ZoomOut();
        }
        function FirstPage() {
            pdfctrl.GoToFirstPage();
        }
        function PreviousPage() {
            pdfctrl.GoToPreviousPage();
        }
        function NextPage() {
            pdfctrl.GoToNextPage();
        }
        function LastPage() {
            pdfctrl.GoToLastPage();
        }
        function SetRotateRight() {
            pdfctrl.RotateRight();
        }
        function SetRotateLeft() {
            pdfctrl.RotateLeft();
        }
        function OnPDFCtrlInit() {
            //PDF的初始化事件回调函数，您可以在这里添加自定义按钮
            pdfctrl.AddCustomToolButton("保存", "Save()", 6);
            pdfctrl.AddCustomToolButton("加盖印章", "InsertSealByUser()", 2);
            pdfctrl.AddCustomToolButton("删除最后一次盖的章", "DeleteLastSeal()", 0);
            pdfctrl.AddCustomToolButton("删除所有印章", "DeleteAllSeal()", 0);
            pdfctrl.AddCustomToolButton("打印", "PrintFile()", 6);
            pdfctrl.AddCustomToolButton("-", "", 0);
            pdfctrl.AddCustomToolButton("实际大小", "SetPageReal()", 16);
            pdfctrl.AddCustomToolButton("适合页面", "SetPageFit()", 17);
            pdfctrl.AddCustomToolButton("适合宽度", "SetPageWidth()", 18);
            pdfctrl.AddCustomToolButton("缩小", "ZoomOut()", 17);
            pdfctrl.AddCustomToolButton("放大", "ZoomIn()", 18);
            pdfctrl.AddCustomToolButton("-", "", 0);
            pdfctrl.AddCustomToolButton("首页", "FirstPage()", 8);
            pdfctrl.AddCustomToolButton("上一页", "PreviousPage()", 9);
            pdfctrl.AddCustomToolButton("下一页", "NextPage()", 10);
            pdfctrl.AddCustomToolButton("尾页", "LastPage()", 11);
        }
    </script>
</head>
<body>

    <!--**************   卓正 PageOffice 客户端代码结束    ************************-->
    <form id="form1" runat="server">
        <div id="content" style="height:98vh;width:auto;">
            @Html.Raw(ViewBag.pdfCtrl)
        </div>
    </form>
</body>
</html>


